package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  Discount.java
 * Author:  Tino
 * Purpose: Defines the Class Discount
 ***********************************************************************/

/**
 * 商品折扣
 * 
 * @pdOid 9cc42c0e-02a9-4e5b-91e3-1dea5802e18a
 */
@Entity
@Table(name = "SPGL_DISCOUNT")
public class Discount extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5188781810523433684L;
	/**
	 * 折扣
	 * 
	 * @pdOid 2879e58d-14c0-47e2-b213-feda9f3e0f1c
	 */
	private Double discountNum;
	/**
	 * 折扣说明
	 * 
	 * @pdOid 44a62595-d574-4ee6-9455-cc6a044d891b
	 */
	private String desc;
	/**
	 * 是否删除
	 * 
	 */
	private Boolean isDelete;
	/**
	 * 备注
	 * 
	 */
	private User user;

	@ManyToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name = "USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	private String remark;

	public Discount() {
		super();
	}

	public Discount(Long id) {
		super(id);
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "DES")
	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	

	@Column(name = "IS_DELETE")
	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "DISCOUNT_NUM", length = 10, precision = 2)
	public Double getDiscountNum() {
		return discountNum;
	}

	public void setDiscountNum(Double discountNum) {
		this.discountNum = discountNum;
	}

}